import Vue from 'vue';
import VueRouter from 'vue-router';
Vue.use(VueRouter);


import HomeContainer from './components/tabbar/HomeContainer.vue';
import MemberContainer from './components/tabbar/MemberContainer.vue';
import SearchContainer from './components/tabbar/SearchContainer.vue';
import ShopcarContainer from './components/tabbar/ShopcarContainer.vue';
import NewsList from './components/news/Newslist.vue';
import NewsInfo from './components/news/NewsInfo.vue';
import PhotoList from './components/photos/PhotoList.vue';
import PhotoInfo from './components/photos/PhotoInfo.vue';
import GoodsList from './components/goodLists/GoodsList.vue';
import GoodsInfo from './components/goodLists/GoodsInfo.vue';
import GoodsDesc from './components/goodLists/GoodsDesc.vue';
import GoodsComment from './components/goodLists/GoodsComment.vue';

var router = new VueRouter({
   routes:[
     {path:"/",redirect:"/home"},
     {path:'/home',component:HomeContainer},
     {path:'/member',component:MemberContainer},
     {path:'/search',component:SearchContainer},
     {path:'/Shopcar',component:ShopcarContainer},
     {path:'/home/newsList',component:NewsList},
     {path:'/home/newsInfo/:id',component:NewsInfo},
     {path:'/home/photoList',component:PhotoList},
     {path:'/home/photoInfo/:id',component:PhotoInfo},
     {path:'/home/goodsList/',component:GoodsList},
     {path:'/home/goodsInfo/:id',component:GoodsInfo,name:'goodsInfo'},
     {path:'/home/goodsDesc/:id',component:GoodsDesc,name:'goodsDesc'},
     {path:'/home/goodsComment/:id',component:GoodsComment,name:'goodsComment'}
   ],
   //覆盖默认的路由高亮效果的类，默认的类叫做router-link-active
   linkActiveClass:'mui-active'
});
export default router;